package com.net.xpay.common.dao;

import com.net.xpay.common.domain.ApiMonitor;
import com.net.xpay.common.model.ApiMonitorAggModel;
import com.net.common.dao.Page;
import com.net.common.dao.PagedMapper;
import com.net.common.annotation.DataCommon;
import com.net.xpay.core.model.ApiMonitorSearchModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
import java.util.List;

@DataCommon
@Repository
public interface ApiMonitorMapper extends PagedMapper<Long, ApiMonitor> {
    List<ApiMonitorAggModel> aggSearch(@Param("searchModel")ApiMonitorSearchModel searchModel, @Param("page") Page page);

    long aggSearchCount(@Param("searchModel") ApiMonitorSearchModel searchModel);

    int deleteByMaxDay(@Param("day") LocalDate day);
}
